import os, sys
from Testpert.utils.runner import Runner
from tests.config import Config

__all__ = ['Tester',]
__version__ = '0.1'

class Tester(object):
	def __init__(self,*args,**kwargs):
		self.baseDirectory = kwargs.pop('baseDir')
		self.baseModule = kwargs.pop('baseMod')
		self.baseRefreshRate = kwargs.pop('baseRate')
		print "Initializing tester instance..."

	def run(self):
		runTests = Runner(testDir=self.baseDirectory,testMod=self.baseModule,testRate=self.baseRefreshRate)
		print "Starting testrunner..."
		runTests.start()

if __name__ == '__main__':
	configuration = Config() 
	testManager = Tester(baseDir=configuration.testDirectory,baseMod=configuration.testModule,baseRate=configuration.testRate)
	testManager.run()
